var express = require('express')
var app = express()
var http = require('http').Server(app)
var io = require('socket.io')(http)
var socketUtils = require('./socket_utils')

app.use(express.static('src/html'))
app.get('/:page', function(req, res){
  let page = req.params.page
  res.sendFile(__dirname + `/html/${page}.html`);
})

io.on('connection', function(socket){
  console.log('one socket connected')
  var serverSocket = new socketUtils.ServerSocket(socket)
})

http.listen(3000, function(){
  console.log('listening on *:3000')
})